function dem = demandGen(mu,sigma,t,r)
% simple seasonal demand function
% r: growth of demand 
% tobias siegfried, 03042007

if nargin < 4
    r = 0; % disp('no growth!');
end

t = 1:t;
g = mu + t.*r;
dem = g + sigma * sin(2*pi*t/365);